package cn.edu.scujcc.customofsichuan;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class Second_miaohui extends AppCompatActivity implements View.OnClickListener{

    Toolbar back;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_second_fdmh);
        back=findViewById(R.id.back_secondPage_fdmh);
        back.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        Button history = findViewById(R.id.fdmh_history);
        Button activity = findViewById(R.id.fdmh_activity);
        Button develop = findViewById(R.id.fdmh_develop);
        history.setOnClickListener(this);
        activity.setOnClickListener(this);
        develop.setOnClickListener(this);


    }

    @Override
    public void onClick(View view) {
        Intent intent = new Intent(this, thirdPage_Detail.class);
        Bundle bundle = new Bundle();
        switch (view.getId()){
            case R.id.fdmh_history:
                bundle.putString("title","丰都庙会历史背景");
                bundle.putString("webUrl","file:///android_asset/fdmh_history.html");
                intent.putExtras(bundle);
                startActivity(intent);
                break;
            case R.id.fdmh_activity:
                bundle.putString("title","丰都庙会相关活动");
                bundle.putString("webUrl","file:///android_asset/fdmh_activity.html");
                intent.putExtras(bundle);
                startActivity(intent);
                break;
            case R.id.fdmh_develop:
                bundle.putString("title","丰都庙会相关保护");
                bundle.putString("webUrl","file:///android_asset/fdmh_develop.html");
                intent.putExtras(bundle);
                startActivity(intent);
                break;



        }
    }
}